<?php
/**
 * This file is part of Swoft.
 *
 * @link     https://swoft.org
 * @document https://swoft.org/docs
 * @contact  group@swoft.org
 * @license  https://github.com/swoft-cloud/swoft/blob/master/LICENSE
 */
use Swoft\Rpc\Server\ServiceServer;
use Swoft\Redis\RedisDb;
use Swoft\Rpc\Server\ServiceDispatcher;
use Tool\Database;
use Tool\Pool;

return [ 
		'noticeHandler' => [ 
				'logFile' => '@runtime/logs/notice-%d{Y-m-d-H}.log' 
		],
		'applicationHandler' => [ 
				'logFile' => '@runtime/logs/error-%d{Y-m-d}.log' 
		],
		'logger' => [ 
				'flushRequest' => true,
				'enable' => true,
				'json' => false 
		],
		'db' => [ 
				'class' => Database::class,
				'dsn' => 'mysql:dbname=b2b2c;host=127.0.0.1',
				'username' => 'root',
				'password' => 'abc123456' 
		],
		'db.pool' => [ 
				'class' => Pool::class,
				'database' => bean ( 'db' ) 
		],
		'redis' => [ 
				'class' => RedisDb::class,
				'host' => '127.0.0.1',
				'port' => 6379,
				'database' => 1,
				'option' => [ 
						'prefix' => 'swoft:' 
				] 
		],
		
		'rpcServer' => [ 
				'class' => ServiceServer::class,
				'port' => 18306,
				'setting' => [
					'worker_num' => 4
				],
				'process' => [
// 						'ReceiveServerMessage' => bean(ReceiveServerMessage::class)
				],
				
		],
		
		'serviceDispatcher' => [
				'middlewares' => [
				],
		],
		
		
		'cliRouter' => [ // 'disabledGroups' => ['demo', 'test'],
] 
];
